#ifndef __GENERATION_H__
#define __GENERATION_H__

#include <vector>
#include <string>
#include <boost/filesystem.hpp>
enum SymbolType;
class Symbol;
class SymbolTable;


class CppGenerate
{
public:
	static CppGenerate * instance();
	
	void directory(std::string str);
	
	void make_code(Symbol * s);
private:
	CppGenerate();
	
	void make_define_enum(Symbol *s);
	void make_define_struct(Symbol *s);
	void make_define_interface(Symbol *s);
	void make_proxy(Symbol *s);
	void make_stub(Symbol *s);
	void make_define_member(Symbol *s , std::string &str);
	void make_serialize(Symbol *s, std::string & str);
	void make_serialize_member(Symbol *s, std::string & str);
	void make_deserialize(Symbol *s, std::string & str);
	void make_deserialize_member(Symbol *s, std::string & str);
		
private:
	std::vector<std::string> _files;
	boost::filesystem::path	 _directory;
};

class As3Generate
{
public:
	static As3Generate * instance();

	void directory(std::string str);

	void make_code(Symbol * s);
private:
	As3Generate();

	void make_define_enum(Symbol *s);
	void make_define_struct(Symbol *s);
	void make_define_interface(Symbol *s);
	void make_proxy(Symbol *s);
	void make_stub(Symbol *s);
	void make_define_member(Symbol *s , std::string &str);
	void make_serialize(Symbol *s, std::string & str);
	void make_serialize_member(Symbol *s, std::string & str);
	void make_deserialize(Symbol *s, std::string & str);
	void make_deserialize_member(Symbol *s, std::string & str);

private:
	std::vector<std::string> _files;
	boost::filesystem::path	 _directory;
};

#endif